const target = [1, 2, 3];
const p = new Proxy(target, {
  get(target, key) {
    console.log('target:', target); // [ 1, 2, 3 ]
    console.log('key:', key); // 0
    return 123;
  }
});

console.log(p[0]); //123
